package com.etonedu.meals.bean;

import android.os.Parcel;
import android.os.Parcelable;

import io.objectbox.annotation.Entity;
import io.objectbox.annotation.Id;

@Entity
public class CardLog implements Parcelable {
    /**
     * device_code :
     * school_name :
     * log_content :
     * class_name :
     * line_number :
     * app_version_code : 1
     * app_version_name :
     * log_time :
     * uid :
     */

    @Id
    private Long id;
    private String device_code;
    private String school_name;
    private String log_content;
    private String class_name;
    private String line_number;
    private int app_version_code;
    private String app_version_name;
    private String log_time;
    private String uid;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getDevice_code() {
        return device_code;
    }

    public void setDevice_code(String device_code) {
        this.device_code = device_code;
    }

    public String getSchool_name() {
        return school_name;
    }

    public void setSchool_name(String school_name) {
        this.school_name = school_name;
    }

    public String getLog_content() {
        return log_content;
    }

    public void setLog_content(String log_content) {
        this.log_content = log_content;
    }

    public String getClass_name() {
        return class_name;
    }

    public void setClass_name(String class_name) {
        this.class_name = class_name;
    }

    public String getLine_number() {
        return line_number;
    }

    public void setLine_number(String line_number) {
        this.line_number = line_number;
    }

    public int getApp_version_code() {
        return app_version_code;
    }

    public void setApp_version_code(int app_version_code) {
        this.app_version_code = app_version_code;
    }

    public String getApp_version_name() {
        return app_version_name;
    }

    public void setApp_version_name(String app_version_name) {
        this.app_version_name = app_version_name;
    }

    public String getLog_time() {
        return log_time;
    }

    public void setLog_time(String log_time) {
        this.log_time = log_time;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeValue(this.id);
        dest.writeString(this.device_code);
        dest.writeString(this.school_name);
        dest.writeString(this.log_content);
        dest.writeString(this.class_name);
        dest.writeString(this.line_number);
        dest.writeInt(this.app_version_code);
        dest.writeString(this.app_version_name);
        dest.writeString(this.log_time);
        dest.writeString(this.uid);
    }

    public CardLog() {
    }

    protected CardLog(Parcel in) {
        this.id = (Long) in.readValue(Long.class.getClassLoader());
        this.device_code = in.readString();
        this.school_name = in.readString();
        this.log_content = in.readString();
        this.class_name = in.readString();
        this.line_number = in.readString();
        this.app_version_code = in.readInt();
        this.app_version_name = in.readString();
        this.log_time = in.readString();
        this.uid = in.readString();
    }

    public static final Creator<CardLog> CREATOR = new Creator<CardLog>() {
        @Override
        public CardLog createFromParcel(Parcel source) {
            return new CardLog(source);
        }

        @Override
        public CardLog[] newArray(int size) {
            return new CardLog[size];
        }
    };
}
